<?php
/**
 * Created by Silent Night.
 * Author: Silent Night
 * email: silentwolf_wp@163.com
 * Date: 2017/9/28
 * Time: 9:19
 */

namespace app\admin\controller;

use think\Controller;
use think\Db;
use think\Session;

class Tmsgcode extends Controller
{
    private $_model;
    private $title_field = [

    ];
    public $pagesize = 10;

    public function _initialize()
    {
        $this->_model = new \app\admin\model\Tmsgcode();
        $this->assign('LoginUserInfo', $this->LoginUserInfo);
        //获取当前用户的权限信息
        $this->assign('ruleLists', $this->LoginUserInfo['CurrPower']);

    }



    public function lists()
    {

        $ser_key = trim(input("request.ser_key"));//auth
        $ser_val = trim(input("request.ser_val"));//auth

        if ($ser_key && $ser_val) {
            $where[$ser_key] = array('like', '%' . $ser_val . '%');
        }


        $lists = $this->_model->lists($where, $this->pagesize);
        $this->assign('lists', $lists);

        $this->assign('request', input("request."));
        return view('lists');

    }
}